package com.aliyun.messagemgt.dto.query;


import com.aliyun.messagemgt.common.dto.base.UserInfo;

/**
 * Created with IDEA
 * 所有查询体均要继承此类以扩展分页查询
 * 继续了用户信息类 一是所有的查询都需要用户信息 二是解决多继承的问题
 *
 * @author:zhangxingxing 0027012120
 * @date:2019/3/15
 * @time:15:41
 */
public class PageQuery extends UserInfo {

    private static final int DEFAULT_PAGE_NUM = 1;

    private static final int DEFAULT_PAGE_SIZE = 10;
    /**
     * 页码
     */
    private Integer pageNum = DEFAULT_PAGE_NUM;
    /**
     * 页面参数
     */
    private Integer pageSize = DEFAULT_PAGE_SIZE;

    public Integer getPageNum() {
        return pageNum;
    }

    public PageQuery setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
        return this;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public PageQuery setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
        return this;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("PageQuery{");
        sb.append("pageNum=").append(pageNum);
        sb.append(", pageSize=").append(pageSize);
        sb.append('}');
        return sb.toString();
    }
}
